﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CheccCoverplateCulvertAssemble.Common.Total
{
    public class CommonConicalSlope : MyNotifyPropertyChanged
    {
        public CommonConicalSlope()
        {
        }
        private ConicalSlopeBase _conicalSlopeLeft = new ConicalSlopeBase();
        private ConicalSlopeBase _conicalSlopeRigh = new ConicalSlopeBase();

        /// <summary>
        /// 左侧锥坡
        /// </summary>
        public ConicalSlopeBase ConicalSlopeLeft
        {
            get
            {
                return _conicalSlopeLeft;
            }
            set
            {
                if (value == _conicalSlopeLeft)
                    return;
                _conicalSlopeLeft = value;
                NotifyPropertyChanged(() => ConicalSlopeLeft);
            }
        }

        /// <summary>
        /// 右侧锥坡
        /// </summary>
        public ConicalSlopeBase ConicalSlopeRight
        {
            get
            {
                return _conicalSlopeRigh;
            }
            set
            {
                if (value == _conicalSlopeRigh)
                    return;
                _conicalSlopeRigh = value;
                NotifyPropertyChanged(() => ConicalSlopeRight);
            }
        }


    }

    /// <summary>
    /// 锥坡信息
    /// </summary>
    public class ConicalSlopeBase : MyNotifyPropertyChanged
    {
        public ConicalSlopeBase()
        {
        }

        public ConicalSlopeBase(
            double slopeRatio,
            double baseDepth,
            double addLenght,
            double culvertInEdge,
            double cutoffWallHeight,
            double cutoffWallThickness,
            double entranceCaveSlope,
            double paveThickness)
        {
            SlopeRatio = slopeRatio;
            BaseDepth = baseDepth;
            AddLenght = addLenght;
            CulvertInEdge = culvertInEdge;
            CutoffWallHeight = cutoffWallHeight;
            CutoffWallThickness = cutoffWallThickness;
            EntranceCaveSlope = entranceCaveSlope;
            PaveThickness = paveThickness;
        }

        private double _slopeRatio;
        private double _baseDepth;
        private double _addLenght;
        private double _culvertInEdge;
        private double _cutoffWallHeight;
        private double _cutoffWallThickness;
        private double _entranceCaveSlope;
        private double _paveThickness;

        #region 锥坡properties

        /// <summary>
        /// 断面坡比
        /// </summary>
        public double SlopeRatio
        {
            get
            {
                return _slopeRatio;
            }
            set
            {
                if (value == _slopeRatio)
                    return;
                _slopeRatio = value;
                NotifyPropertyChanged(() => SlopeRatio);
            }
        }

        /// <summary>
        /// 基础深度
        /// </summary>
        public double BaseDepth
        {
            get
            {
                return _baseDepth;
            }
            set
            {
                if (value == _baseDepth)
                    return;
                _baseDepth = value;
                NotifyPropertyChanged(() => BaseDepth);
            }
        }

        /// <summary>
        /// 铺砌加长
        /// </summary>
        public double AddLenght
        {
            get
            {
                return _addLenght;
            }
            set
            {
                if (value == _addLenght)
                    return;
                _addLenght = value;
                NotifyPropertyChanged(() => AddLenght);
            }
        }

        /// <summary>
        /// 洞口内侧襟边
        /// </summary>
        public double CulvertInEdge
        {
            get
            {
                return _culvertInEdge;
            }
            set
            {
                if (value == _culvertInEdge)
                    return;
                _culvertInEdge = value;
                NotifyPropertyChanged(() => CulvertInEdge);
            }
        }

        /// <summary>
        /// 截水墙高(含铺砌)
        /// </summary>
        public double CutoffWallHeight
        {
            get
            {
                return _cutoffWallHeight;
            }
            set
            {
                if (value == _cutoffWallHeight)
                    return;
                _cutoffWallHeight = value;
                NotifyPropertyChanged(() => CutoffWallHeight);
            }
        }

        /// <summary>
        /// 截水墙厚
        /// </summary>
        public double CutoffWallThickness
        {
            get
            {
                return _cutoffWallThickness;
            }
            set
            {
                if (value == _cutoffWallThickness)
                    return;
                _cutoffWallThickness = value;
                NotifyPropertyChanged(() => CutoffWallThickness);
            }
        }

        /// <summary>
        /// 洞口铺砌坡度
        /// </summary>
        public double EntranceCaveSlope
        {
            get
            {
                return _entranceCaveSlope;
            }
            set
            {
                if (value == _entranceCaveSlope)
                    return;
                _entranceCaveSlope = value;
                NotifyPropertyChanged(() => EntranceCaveSlope);
            }
        }

        /// <summary>
        /// 洞口铺砌厚度
        /// </summary>
        public double PaveThickness
        {
            get
            {
                return _paveThickness;
            }
            set
            {
                if (value == _paveThickness)
                    return;
                _paveThickness = value;
                NotifyPropertyChanged(() => PaveThickness);
            }
        }

        #endregion

    }
}
